import axios from "axios"
const instance = axios.create({
  baseURL: "/api",
})

instance.interceptors.response.use(function (response) {
  return response.data
})

instance.interceptors.request.use(function (config) {
  config.headers = {
    authorization: localStorage.getItem("authorization"),
  }
  return config
})

export default instance
